/* eslint-disable no-undef */
import {Toast} from 'mint-ui'
import axios from 'axios'
import config from '../config'

export default {
  Toast (opts) {
    let instance = Toast(opts)
    setTimeout(() => {
      instance.close()
    }, 1500)
  },
  login (params) {
    return axios.post(config.url('login'), params)
  },
  list () {
    return axios.post(config.url('list'))
  }
}
